Encryption scheme

Definition

Let 𝒦\mathcal{K} denote the key space, \mathcal{M} denote the message space, and 𝒞\mathcal{C} denote the cipher space. An encryption scheme is a pair of polynomial time algorithms Enc:𝒦×𝒞Enc(k,m)=Enck(m)Dec:𝒦×𝒞Dec(k,m)=Deck(m)\begin{eqnarray} \operatorname{Enc}: \mathcal{K} \times \mathcal{M} \to \mathcal{C} \qquad \operatorname{Enc}(k,m) = \operatorname{Enc}_k(m)\\ \operatorname{Dec}: \mathcal{K} \times \mathcal{M} \to \mathcal{C} \qquad \operatorname{Dec}(k,m) = \operatorname{Dec}_k(m) \end{eqnarray} such that k𝒦\forall k \in \mathcal{K}, m\forall m \in \mathcal{M}, Dec(k,Enc(k,m))=m\operatorname{Dec}(k, \operatorname{Enc}(k,m)) = m (correctness)

Examples